import { DefaultLayout } from '@/layout'
import type { Route } from '@/layout/components'

export default {
  path: '/user',
  name: 'User',
  component: DefaultLayout,
  redirect: '/user/userManage',
  meta: {
    title: '用户管理',
    icon: 'menu-user',
    alwaysShow: true,
    sort: 1,
    roles: ['用户管理']
  },
  children: [
    {
      path: 'userManage',
      name: 'UserManage',
      component: () => import('@/views/user/userManage'),
      meta: { title: '用户管理', roles: ['用户列表'] }
    },
    {
      path: 'userSearch',
      name: 'UserSearch',
      component: () => import('@/views/user/userSearch/index'),
      meta: { title: '客户查询', roles: ['客户查询'] }
    },
    {
      path: 'customerInfo',
      name: 'CustomerInfo',
      component: () => import('@/views/user/userSearch/customerInfo'),
      meta: { title: '客户信息', hidden: true }
    },
    {
      path: 'yxFeedback',
      name: 'YxFeedback',
      component: () => import('@/views/user/feedback'),
      meta: { title: '意见反馈', roles: ['意见反馈'] }
    }
  ]
} as Route
